Skip to content

Conversation

@dosumis
Copy link
Contributor

@dosumis dosumis commented Dec 2, 2025

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the agent connection implementation by introducing a unified query interface (query_unified) that consolidates functionality from multiple deprecated methods. The refactoring aims to reduce code duplication by having all query methods delegate to a single implementation.

  • Introduces new QueryResult dataclass and query_unified method as the central query interface
  • Deprecates query_with_tools, query_with_tracking, query_with_schema, and query_with_schema_and_tracking methods, replacing their implementations with calls to query_unified
  • Updates mypy configuration to type-check tests and adds error suppression for test-specific issues

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/cellsem_llm_client/agents/agent_connection.py Adds unified query interface with QueryResult dataclass and query_unified method; refactors existing methods to use the new interface; extracts helper methods _run_tool_loop and _build_usage_metrics
tests/unit/test_agent_connection.py Adds unit tests for new query_unified method and deprecation warnings; updates existing test with proper tool definition
pyproject.toml Updates author email, changes development status classifier, and adds mypy error suppression for tests
.pre-commit-config.yaml Updates mypy pre-commit hook to use config file and check both src and tests
.github/workflows/test.yml Adds tests directory to mypy checks in CI workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI commented Dec 2, 2025

@dosumis I've opened a new pull request, #12, to work on those changes. Once the pull request is ready, I'll request review from you.

@dosumis dosumis changed the title fixed unit tests etc unify queries Dec 2, 2025
@dosumis dosumis merged commit 877fff4 into main Dec 2, 2025
4 checks passed
@dosumis dosumis deleted the unify_queries branch December 2, 2025 16:43
@dosumis dosumis restored the unify_queries branch December 2, 2025 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants